using System;
using SMS.SMPPClient.Util;
using System.Collections;

namespace SMS.SMPPClient.PDU.Outgoing
{
    /// <summary>
    /// Class to represent a generic negative acknowledgment.
    /// </summary>

    public class SMPPGenericNACK : SMPPRequest
    {
        /// <summary>
        /// Creates a new generic NACK.
        /// </summary>
        public SMPPGenericNACK(UInt32 errCode)
        {
            _CommandStatus = errCode;
            _CommandID = CommandIDType.generic_nack;
        }

        ///<summary>
        /// Gets the hex encoding (big-endian) of this PDU.
        ///</summary>
        ///<return>The hex-encoded version of the PDU</return>
        public override byte[] GetMSBHexEncoding()
        {
            ArrayList pdu = GetPDUHeader();

            return EncodePDUForTransmission(pdu);
        }
    }
}
